<%@page import="model.entity.Bill"%>
<%@page import="model.AccountImp"%>
<%@page import="java.util.List"%>
<%@page import="model.entity.Account"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="<c:url value="/views/admin/js/jquery-1.8.2.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/views/admin/js/tabifier.js"/>"></script>
<script type="text/javascript" src="<c:url value="/views/admin/js/js.js"/>"></script>
<script type="text/javascript" src="<c:url value="/views/admin/js/jPages.js"/>"></script>
<script type="text/javascript" src="<c:url value="/views/admin/js/highlight.pack.js"/>"></script>

<script type="text/javascript">
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

  </script>
   <script>
  $(function(){
    $("div.holder").jPages({
      containerID : "movies",
      previous : "Pre",
      next : "Next",
      perPage : 10,
      delay : 20
    });
    
    
  });
  </script>

  <style type="text/css">
  table{ width: 960px; margin-top: 30px; }
  td, th{ text-align: left; height:25px; }
  th { background: #f5f5f5; }
  th:nth-child(1){ width:20%; }
  th:nth-child(2){ width:20%; }
  th:nth-child(3){ width:20%; }
  th:nth-child(4){ width:20%;}
  th:nth-child(5){ width:20%;}

  form { float: left; margin-right: 10px; }
  form label { margin-right: 5px; }
  form select { margin-right: 75px; }
  </style>
 <link href="<c:url value="/views/admin/css/jPages.css"/>" rel="stylesheet" type="text/css" />
  <link href="<c:url value="/views/admin/css/animate.css"/>" rel="stylesheet" type="text/css" />
   <link href="<c:url value="/views/admin/css/style.css"/>" rel="stylesheet" type="text/css" />
    <link href="<c:url value="/views/admin/css/github.css"/>" rel="stylesheet" type="text/css" />



<h2>Bill</h2>
            
            
            <p class="message1">
<%
                            String message = request.getAttribute("messagecreate")==null ? "":request.getAttribute("messagecreate").toString();
                        out.println(message);
%>
                 </p>
            <p class="message1">
<%
                            String message1 = request.getAttribute("messageedit")==null ? "":request.getAttribute("messageedit").toString();
                        out.println(message1);
%>
<%
                            String message2 = request.getAttribute("message1")==null ? "":request.getAttribute("message1").toString();
                        out.println(message2);
%>
                 </p>      
    <div class="clearfix">&nbsp;</div>

    	
    <table width="960px" class="" border="0" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>Username</th>
            <th>Total Amount</th>
            <th>Date Purchase</th>
            <th>Payment</th>
            <th>Option</th>
        </tr>
    </thead>
        <tbody id="movies">
            
<%
                
    List<Bill> listbill = (List<Bill>) request.getAttribute("listbill");
    for(Bill list1 : listbill)
    {
%>
        <tr>
        
            
            <td scope="col"><%= list1.getUsername() %></td>
            <td scope="col"><%= list1.getTotalamount() %></td>
            <td scope="col"><%= list1.getDatepurchase() %></td>
            <td scope="col"><%= list1.isStatus() == true ? "Payment" : "Not payment" %></td>  
        <form method="POST" action="">
            <td scope="col"><a href="<c:url value="<%= "/admin/bill/detail/" + list1.getBillid() %>"></c:url>"><img title="Bill Detail" src="<c:url value="/views/admin/images/icondock/billdetail.png"/>"/></a>
           
            </td>
        </form>     
        </tr>
<%}%>      
    </tbody></table>
  
             
<div class="holder"></div>  
    <!-- END TABULAR DATA EXAMPLE -->

 
<div class="clearfix">&nbsp;</div>
